package com.sunlg.smarthome.data.remote;

import rx.Subscriber;


/**
 * 对结果回调的封装
 * Created by sunlg on 16-10-21.
 */

public abstract class MySubscriber<T> extends Subscriber<T> {
    @Override
    public void onCompleted() {

    }

    @Override
    public void onError(Throwable e) {
        _onError(e);
    }

    @Override
    public void onNext(T data) {
        onSuccess(data);
    }

    public abstract void onSuccess(T data);

    public abstract void _onError(Throwable e);

}
